﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;

namespace KF.Servers.BaseInfo
{
    /// <summary>
    /// Customer 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.ComponentModel.ToolboxItem(false)]
    public class Customer : System.Web.Services.WebService
    {

        [WebMethod]
        public String AddCustomer(KF.DHLModel.BaseInfo.Customer customer)
        {
            string result = "";
            try
            {
                result = (new KF.DHLBL.Customer()).Add(customer);
            }
            catch(Exception ex)
            {
                result = ex.Message;
            }
            return result;
        }


        [WebMethod]
        public String UpdateCustomer(KF.DHLModel.BaseInfo.Customer customer)
        {
            string result = "";
            try
            {
                result = (new KF.DHLBL.Customer()).Update(customer);
            }
            catch (Exception ex)
            {
                result = ex.Message;
            }
            return result;
        }

        [WebMethod]
        public List<KF.DHLModel.BaseInfo.Customer> GetALL()
        {
            return (new KF.DHLBL.Customer()).GetALL();
        }
    }
}
